﻿using System;

namespace Patcher.Imports
{

    /// <summary>
    /// Memory allocation flags - compatible with WinAPI functions.
    /// </summary>
    [Flags]
    public enum AllocationType : uint
    {
        Commit                      = 0x00001000,
        Reserve                     = 0x00002000,
        Decommit                    = 0x00004000,
        Release                     = 0x00008000,
        Reset                       = 0x00080000,
        TopDown                     = 0x00100000,
        WriteWatch                  = 0x00200000,
        Physical                    = 0x00400000,
        LargePages                  = 0x20000000
    }

    /// <summary>
    /// Page protection flags - compatible with WinAPI functions.
    /// </summary>
    [Flags]
    public enum MemoryProtection : uint
    {
        NoAccess                    = 0x00000001,
        ReadOnly                    = 0x00000002,
        ReadWrite                   = 0x00000004,
        WriteCopy                   = 0x00000008,
        Execute                     = 0x00000010,
        ExecuteRead                 = 0x00000020,
        ExecuteReadWrite            = 0x00000040,
        ExecuteWriteCopy            = 0x00000080,
        GuardModifierflag           = 0x00000100,
        NoCacheModifierflag         = 0x00000200,
        WriteCombineModifierflag    = 0x00000400
    }

    /// <summary>
    /// Memory freeing flags - compatible with WinAPI functions.
    /// </summary>
    [Flags]
    public enum FreeType : uint
    {
        Decommit                    = 0x00004000,
        Release                     = 0x00008000
    }

    /// <summary>
    /// Process access flags - compatible with WinAPI functions.
    /// </summary>
    [Flags]
    public enum ProcessAccessFlags : uint
    {
        Terminate                   = 0x00000001,
        CreateThread                = 0x00000002,
        VMOperation                 = 0x00000008,
        VMRead                      = 0x00000010,
        VMWrite                     = 0x00000020,
        DupHandle                   = 0x00000040,
        SetInformation              = 0x00000200,
        QueryInformation            = 0x00000400,
        Synchronize                 = 0x00100000
    }

    /// <summary>
    /// Thread access flags - compatible with WinAPI functions.
    /// </summary>
    [Flags]
    public enum ThreadAccessFlags : uint
    {
        StandardRightsRequired      = 0x000F0000,
        Synchronize                 = 0x00100000,
        AllAccess                   = 0x001F03FF
    }

}